package alvarodelrosal.chat.client.modelo;

public class Message {
    
    private ChatUser from;
    private String text;

    public Message(ChatUser from, String text) {
        this.from = from;
        this.text = text;
    }

    public ChatUser getFrom() {
        return from;
    }

    public String getText() {
        return text;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Message other = (Message) obj;
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + (this.from != null ? this.from.hashCode() : 0);
        hash = 97 * hash + (this.text != null ? this.text.hashCode() : 0);
        return hash;
    }

}
